]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspace: Don't do checks in animateAllocation()
authorJonas Dreßler <verdre@v0yd.nl>
Thu, 25 Feb 2021 10:57:22 +0000 (11:57 +0100)
committerMarge Bot <marge-bot@gnome.org>
Tue, 9 Mar 2021 15:40:49 +0000 (15:40 +0000)
These checks aren't needed since Clutter should enforce this for us
already and skip the implicit transition when possible. This gets our
time spent in vfunc_allocate() down to 2.0 ms with 20 windows

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1743>

js/ui/workspace.js

index 3337b2ed069ce58a969e94decd5166356ffb09f0..e78630df498a7ac54457d1a8fcc853291552594e 100644 (file)
@@ -382,13 +382,6 @@ var UnalignedLayoutStrategy = class extends LayoutStrategy {
 };
 
 function animateAllocation(actor, box) {
-    if (actor.allocation.equal(box) ||
-        actor.allocation.get_width() === 0 ||
-        actor.allocation.get_height() === 0) {
-        actor.allocate(box);
-        return null;
-    }
-
     actor.save_easing_state();
     actor.set_easing_mode(Clutter.AnimationMode.EASE_OUT_QUAD);
     actor.set_easing_duration(200);